package com.xxx.listener;

import java.time.Instant;

import com.google.common.eventbus.Subscribe;
import com.xxx.bean.eventbus.CustomEvent;

/**
 * EventBus事件监听器2
 **/
public class EventListener2 {
	
    @Subscribe
    public void test(CustomEvent event){
        System.out.println(Instant.now() +",监听者2,收到事件："+event.getAge()+"，线程号为："+Thread.currentThread().getName());
        try {
            Thread.sleep(3000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
    
}
